home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_351 / pdc / bin.lzh / lib / src / CreateExtIO.c < prev    next >
C/C++ Source or Header  |  1990-04-06  |  638b  |  29 lines

  1. #include <exec/types.h>
  2. #include <exec/memory.h>
  3. #include <exec/io.h>
  4. #include <exec/ports.h>
  5.  
  6. struct IORequest *
  7. CreateExtIO(taskReplyPort, size_extreq)
  8. struct MsgPort *taskReplyPort;
  9. LONG size_extreq;
  10. {
  11.     struct IORequest *myExtReq;
  12.  
  13.     if (taskReplyPort == 0) {
  14.        myExtReq = 0;
  15.        }
  16.     else {
  17.         myExtReq = AllocMem (size_extreq, MEMF_CLEAR | MEMF_PUBLIC);
  18.         if (myExtReq != 0) {
  19.             myExtReq->io_Message.mn_Node.ln_Type = NT_MESSAGE;
  20.             myExtReq->io_Message.mn_Node.ln_Pri = 0;
  21.             myExtReq->io_Message.mn_ReplyPort = taskReplyPort;
  22.             }
  23.         }
  24.  
  25.     return (myExtReq);
  26. }
  27.  
  28.  
  29.